﻿CREATE TABLE [dbo].[Employee_Executive_Level] (
    [Id]     INT           IDENTITY (1, 1) NOT NULL,
    [Title]  NVARCHAR (50) NULL,
    [Uptime] DATETIME      DEFAULT (getdate()) NULL
);


GO
-- =============================================
-- Author:		<Author,,Name>
-- Create date: <Create Date,,>
-- Description:	<Description,,>
-- =============================================
CREATE TRIGGER dbo.Employee_Executive_Level_Update_Trigger 
   ON  dbo.Employee_Executive_Level 
   AFTER UPDATE
AS 
BEGIN
	-- SET NOCOUNT ON added to prevent extra result sets from
	-- interfering with SELECT statements.
	SET NOCOUNT ON;
	declare @title nvarchar(50)
	declare @oldTitle nvarchar(50)
	Select @title=Title from Inserted 
	Select @oldTitle=Title from deleted
	update Employee Set XZJB=@title where XZJB=@oldTitle
    -- Insert statements for trigger here

END
